# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidManagement.V1.Model.AppProcessInfo do
  @moduledoc """
  Information about a process. It contains process name, start time, app Uid, app Pid, seinfo tag, hash of the base APK.

  ## Attributes

  *   `apkSha256Hash` (*type:* `String.t`, *default:* `nil`) - SHA-256 hash of the base APK, in hexadecimal format.
  *   `packageNames` (*type:* `list(String.t)`, *default:* `nil`) - Package names of all packages that are associated with the particular user ID. In most cases, this will be a single package name, the package that has been assigned that user ID. If multiple application share a UID then all packages sharing UID will be included.
  *   `pid` (*type:* `integer()`, *default:* `nil`) - Process ID.
  *   `processName` (*type:* `String.t`, *default:* `nil`) - Process name.
  *   `seinfo` (*type:* `String.t`, *default:* `nil`) - SELinux policy info.
  *   `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Process start time.
  *   `uid` (*type:* `integer()`, *default:* `nil`) - UID of the package.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apkSha256Hash => String.t() | nil,
          :packageNames => list(String.t()) | nil,
          :pid => integer() | nil,
          :processName => String.t() | nil,
          :seinfo => String.t() | nil,
          :startTime => DateTime.t() | nil,
          :uid => integer() | nil
        }

  field(:apkSha256Hash)
  field(:packageNames, type: :list)
  field(:pid)
  field(:processName)
  field(:seinfo)
  field(:startTime, as: DateTime)
  field(:uid)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidManagement.V1.Model.AppProcessInfo do
  def decode(value, options) do
    GoogleApi.AndroidManagement.V1.Model.AppProcessInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidManagement.V1.Model.AppProcessInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
